use crate::tutorials::wgpu::{vertex::*};

pub const DEFAULT_WINDOW_NAME: &str = "my_window";
pub const DEFAULT_WINDOW_TITLE: &str = "my window title";
pub const DEFAULT_WINDOW_WIDTH: u32 = 800;
pub const DEFAULT_WINDOW_HEIGHT: u32 = 600;

pub const MAX_FRAME_TIME: f32 = 0.05;
pub const DEFAULT_CAMERA_TRANSLATION_Z: f32 = -2.5;
pub const DEFAULT_CAMERA_FOVY: f32 = std::f32::consts::FRAC_PI_4;
pub const DEFAULT_CAMERA_NEAR_PLANE: f32 = 0.1;
pub const DEFAULT_CAMERA_FAR_PLANE: f32 = 100.0;
 
pub const SDR_BASE: &str = "src\\shaders\\";
pub const RELATIVE_SDR_BASE: &str = "..\\..\\shaders\\";
pub const VERT_PATH: &str = "simple_shader_vert.spv";
pub const FRAG_PATH: &str = "simple_shader_frag.spv";
pub const WGSL_PATH: &str = "shader.wgsl";

pub const IMG_BASE: &str = "src\\texs\\";
pub const MODEL_BASE: &str = "src\\models\\";

pub const IMG_NAME: &str = "eg.png";
pub const NORMAL_MAPPING: &str = "normal_mapping.png";
pub const MODEL_NAME: &str = "md1\\md1.obj";

pub const DEFAULT_WORKGROUP_SIZE: (u32, u32, u32) = (16, 16, 1);

pub const VERTICES: &[ExampleVertex] = &[
    ExampleVertex { position: [-0.0868241, 0.49240386, 0.0],   color: [0.9, 0.1, 0.1], tex_coords: [0.4131759, 0.99240386],    }, // A
    ExampleVertex { position: [-0.49513406, 0.06958647, 0.0],  color: [0.1, 0.9, 0.1], tex_coords: [0.0048659444, 0.56958647], }, // B
    ExampleVertex { position: [-0.21918549, -0.44939706, 0.0], color: [0.1, 0.1, 0.9], tex_coords: [0.28081453, 0.05060294],   }, // C
    ExampleVertex { position: [0.35966998, -0.3473291, 0.0],   color: [0.7, 0.2, 0.2], tex_coords: [0.85967, 0.1526709],       }, // D
    ExampleVertex { position: [0.44147372, 0.2347359, 0.0],    color: [0.2, 0.7, 0.2], tex_coords: [0.9414737, 0.7347359],     }, // E
];

pub const INDICES: &[u16] = &[
    0, 1, 4,
    1, 2, 4,
    2, 3, 4,
];

pub const QUAD_VERTICES: &[ExampleVertex] = &[
    ExampleVertex { position: [-1.0, -1.0, 0.0], color: [1.0, 1.0, 1.0], tex_coords: [0.0, 1.0] }, // left-bottom
    ExampleVertex { position: [1.0, -1.0, 0.0], color: [1.0, 1.0, 1.0], tex_coords: [1.0, 1.0] }, // right-bottom
    ExampleVertex { position: [-1.0, 1.0, 0.0], color: [1.0, 1.0, 1.0], tex_coords: [0.0, 0.0] }, // left-top
    ExampleVertex { position: [1.0, 1.0, 0.0], color: [1.0, 1.0, 1.0], tex_coords: [1.0, 0.0] }, // right-top
];

pub const QUAD_INDICES: &[u16] = &[
    0, 1, 2,
    2, 1, 3,
];

pub const NUM_INSTANCES_PER_ROW: u32 = 10;
pub const INSTANCE_DISPLACEMENT: cgmath::Vector3<f32> = cgmath::Vector3::new(NUM_INSTANCES_PER_ROW as f32 * 0.5, 0.0, NUM_INSTANCES_PER_ROW as f32 * 0.5);
